﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using agvcontroller.Log;

namespace agvcontroller.GUI
{
    public enum enumSystemMode
    {
        AGVC,
        Vehicle,
        Node,
        Cross,
        LockZone,
    }

    public delegate void deleUCSystemSideChanged(object sender,enumSystemMode mode );
    /// <summary>
    /// Interaction logic for UCSystemSidePanel.xaml
    /// </summary>
    public partial class UCSystemSidePanel : UserControl
    {
        public event deleUCSystemSideChanged OnSideModeChanged;

        Logger Log = new Logger("GUI");

        public UCSystemSidePanel()
        {
            InitializeComponent();
        }

        private void btnVehicle_Click(object sender, RoutedEventArgs e)
        {
            if(OnSideModeChanged!=null)
                OnSideModeChanged(this,enumSystemMode.Vehicle);
        }

        private void btnNode_Click(object sender, RoutedEventArgs e)
        {
            if(OnSideModeChanged!=null)
                OnSideModeChanged(this,enumSystemMode.Node);
        }

        private void btnCross_Click(object sender, RoutedEventArgs e)
        {
            if(OnSideModeChanged!=null)
                OnSideModeChanged(this,enumSystemMode.Cross);
        }

        private void btnLockZone_Click(object sender, RoutedEventArgs e)
        {
            if(OnSideModeChanged!=null)
                OnSideModeChanged(this,enumSystemMode.LockZone);
        }

        private void btnAGVC_Click(object sender, RoutedEventArgs e)
        {
            if(OnSideModeChanged!=null)
                OnSideModeChanged(this,enumSystemMode.AGVC);
        }
    }
}
